package com.yellowpage.wf.data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import java.util.Date;

/**
 * Context entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "WF_NODE_ATTACHMENT_INSTANCE")
public class NodeAttachmentInstance implements java.io.Serializable {

	// Fields

	private Long nodeAttachmentInstanceId;
	private Long version;
	private Long workflowNodeInstanceId;
	private Long nodeAttachmentId;
	private Long resourceId;
	private String note;
	private Long createUser;
	private Date createTime;

	// Constructors

	/** default constructor */
	public NodeAttachmentInstance() {
	}

	/** full constructor */
	public NodeAttachmentInstance(Long version, Long workflowNodeInstanceId, Long nodeAttachmentId, Long resourceId
			 ,String note, Long createUser, Date createTime) {
		this.version = version;
		this.workflowNodeInstanceId = workflowNodeInstanceId;
		this.nodeAttachmentId = nodeAttachmentId;
		this.resourceId = resourceId;
		this.note = note;
		this.createUser = createUser;
		this.createTime = createTime;
	}
	
	// Property accessors
	@GenericGenerator(name = "generator", strategy = "identity")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "NODE_ATTACHMENT_INSTANCE_ID", unique = true, nullable = false, precision = 18, scale = 0)
	public Long getNodeAttachmentInstanceId() {
		return nodeAttachmentInstanceId;
	}
	public void setNodeAttachmentInstanceId(Long nodeAttachmentInstanceId) {
		this.nodeAttachmentInstanceId = nodeAttachmentInstanceId;
	}
	@Column(name = "VERSION", precision = 18, scale = 0)
	public Long getVersion() {
		return version;
	}
	public void setVersion(Long version) {
		this.version = version;
	}
	@Column(name = "WORKFLOW_NODE_INSTANCE_ID", precision = 18, scale = 0)
	public Long getWorkflowNodeInstanceId() {
		return workflowNodeInstanceId;
	}
	public void setWorkflowNodeInstanceId(Long workflowNodeInstanceId) {
		this.workflowNodeInstanceId = workflowNodeInstanceId;
	}
	@Column(name = "NODE_ATTACHMENT_ID", precision = 18, scale = 0)
	public Long getNodeAttachmentId() {
		return nodeAttachmentId;
	}
	public void setNodeAttachmentId(Long nodeAttachmentId) {
		this.nodeAttachmentId = nodeAttachmentId;
	}
	@Column(name = "RESOURCE_ID", precision = 18, scale = 0)
	public Long getResourceId() {
		return resourceId;
	}
	public void setResourceId(Long resourceId) {
		this.resourceId = resourceId;
	}
	@Column(name = "NOTE", length = 128)
	public String getNote() {
		return note;
	}
	public void setNote(String note) {
		this.note = note;
	}
	@Column(name = "CREATE_USER", precision = 18, scale = 0)
	public Long getCreateUser() {
		return this.createUser;
	}
	public void setCreateUser(Long createUser) {
		this.createUser = createUser;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME", length = 7)
	public Date getCreateTime() {
		return this.createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
}